1. Field of the Invention
The present invention relates to a method for controlling the data bit rate of a video encoder, and more particularly to a method for controlling the data bit rate of a differential pulse code modulation/discrete cosine transform (DPCM/DCT) video encoder, which is adapted to achieve a bit rate control in accordance with a video signal band compression scheme using a differential pulse code modulation (DPCM) and a discrete cosine transform (DCT), thereby obtaining a supreme picture quality while preventing a buffer overflow or underflow phenomenon from occurring in the encoder.
2. Description of the Prior Art
The DPCM/DCT scheme is a video signal band compression scheme which is most commonly used. The MPEG-1, MPEG-2 and H.261, which are digital video data compression standards proposed by international standardization organizations, namely, the ISO/IEC and ITU-T, use the DPCM/DCT scheme. Since the demand for digital video services is increasing, the demand for DPCM/DCT codec (coder/decoder) using the above-mentioned standards will increase abruptly in future. An algorithm for controlling the data bit rate of a video encoder has also been proposed which is capable of obtaining a supreme picture quality while preventing a buffer overflow or underflow phenomenon from occurring in the encoder. This algorithm is an important technique in determining the performance of encoders irrespective of the above-mentioned standards.
The DPCM/DCT video signal band compression method removes a redundancy in video signals. This method utilizes the property that there is much redundancy among video signals in terms of space and time. In order to remove a spatial redundancy in video signals, each video is divided into a plurality of blocks (for example, 8.times.8 blocks) which are, in turn, subjected to a two-dimensional DCT. The resultant data, namely coefficients are obtained after the two-dimensional DCT are distributed in accordance with different frequency components. In most cases, video data contains a large number of low-frequency components. Accordingly, video blocks processed by the DCT exhibit an energy distribution in such a manner that a large level of energy is distributed at the coefficients associated with the low-frequency components. Meanwhile, the organ of vision of the human being is insensitive to high-frequency components of video. Accordingly, when transmission of a video is carried out in such a manner that only the low-frequency components of the video are transmitted while the high-frequency components of the video are eliminated as much as possible, a high data compression effect can be obtained. The removal of a spatial redundancy in successive videos may be achieved by finding a macroblock (16.times.16 pixels) from one of the previous videos most similar to the macroblock of the current video, calculating the difference between the two macroblocks, and transmitting only the calculated difference value and vectors respectively indicating the positions of the macroblocks. In the case of the vectors, only the difference between those vectors is transmitted. In this case, a high data compression effect is obtained. It is also possible to obtain a high data compression effect by coding values, frequently used, by codes of short length for values while coding values, rarely used, by codes of long length. The standards using the DPCM/DCT such as MPEG and H.121 stipulate the above-mentioned compression algorithms, a variety of variable length codes and a syntax for the transmission of those codes.
The DPCM/DCT video signal band compression method uses two video coding modes, namely, an intra mode (I mode) and a predictive mode (P mode). In the I mode, video data is processed in accordance with DCT in order to remove a spatial redundancy for every block in the video data. The resultant DCT coefficients are quantized and then transmitted. The P mode is adapted to remove a time redundancy between successive videos. The motion vector of the previous video's macroblock, most similar to that of the current video, is found. The difference between the found macroblocks is processed by DCT. The resultant DCT coefficient is quantized and then transmitted along with a vector. This P mode is carried out for every macroblock. In the I mode, the information of a video is transmitted without any variation. Accordingly, the data transmitted in the I mode can always be decoded because a random access thereto is always possible. In the P mode, however, a motion compensation of the current video from the previous video is carried out. Accordingly, a reference picture is essentially required upon decoding the data transmitted in the P mode. Even in the P video mode, macroblocks found as having no similar portion to those of the previous video are transmitted in the I mode. In MPEG-2, the unit of randomly accessible video data is defined as a group of pictures (GOP). The first picture of a GOP is coded in the I mode because it requires no reference picture. The remaining pictures of the GOP are coded in the P mode. Generally, the bit amount of bit streams produced for I-mode pictures is considerably greater than that of the P-mode pictures (about 3 times) when the same picture quality is obtained. In that regard, a higher data compression effect is obtained after a motion compensation is carried out. The bit amount of bit streams produced in the encoding operation varies greatly, depending on the characteristics of an input video and the coding mode used. In order to transmit amount-variable bit streams in a constant bit rate, buffers should be provided for both the encoder and decoder respectively, thereby reducing the difference between the encoder's data production amount and the transmission capacity given. In this case, the encoder should also be controlled so that the production rate of bit streams corresponds to the transmission capacity, thereby preventing an overflow or underflow state of the buffer. This control is called a "bit rate control". For such a bit rate control, it is effective to carry out a bit allocation for data to be coded while taking into consideration the transmission capacity, and to control generation of bits in such a manner that the amount of generated bits corresponds to the amount of allocated bits. The bit amount of a bit stream generated is controlled by the step size of a quantizer. An increase in the step size of the quantizer results in an increase in the loss of quantized data. In this case, the amount of generated bits is reduced, even though the picture quality is degraded. A reduced step size of the quantizer results in an increase in the amount of generated bits, even though a better picture quality is obtained. Therefore, the bit rate control is directly connected with the picture quality of decoded videos. Since there is no standard for such a bit rate control, different bit rate control methods may be applied to encoders having different configuration, respectively. The performance of an encoder also depends on the bit rate control used.
In the conventional bit rate control algorithm for DPCM/DCT video encoders, a method is mainly used in which the step size of the quantizer used is simply determined in such a manner that is proportional to the fill capacity of the buffer used. A method is also used in which the complexity of an input video is calculated so that bits are allocated in proportion to the calculated complexity. Although the method, which takes into consideration only the fill capacity of the buffer used, uses a simple algorithm and a simple circuit configuration, it is ineffective because a severe variation in the picture quality occurs. On the other hand, the method involving a calculation of the complexity of an input video should use a complex algorithm and a complex circuit configuration.